package com.llmcu.source.java8.java8inaction.chapter12.localdate.param;

import java.time.LocalDate;
import java.time.temporal.ChronoField;

/**
 * xxxx
 *
 * @author liuling
 * @date 2024-12-13 9:52
 */
public class TemporalFieldDemo {
    public static void main(String[] args) {

        LocalDate localDate = LocalDate.of(2024,2,29);
        // Reading LocalDate values using a TemporalField
        int year2 = localDate.get(ChronoField.YEAR);
        int month2 = localDate.get(ChronoField.MONTH_OF_YEAR);
        int dayOfMonth2 = localDate.get(ChronoField.DAY_OF_MONTH);
        int dayOfWeek2 = localDate.get(ChronoField.DAY_OF_WEEK);


    }
}
